package org.assess.oa.process.action;

import java.util.Date;

import org.apache.commons.lang.StringUtils;
import org.assess.core.action.BaseAction;
import org.assess.oa.process.bean.AsProLeave;

/**
 * @description 请调休申请的Action实现类
 * @author XiaLongxiang
 * @createtime 2012-6-25 下午5:49:12
 */
public class AsProLeaveAction extends BaseAction {
    /** 序列化号 */
    private static final long serialVersionUID = -2927966321752238721L;
    
    private AsProLeave proleave;
    
    /**
     * 加载单个申请
     * @return
     */
    public String loadAppleave() {
        if (proleave != null && StringUtils.isNotBlank(proleave.getPro_leave_id())) {
            super.setEdit(true);
        }
        else {
            proleave = new AsProLeave();
            proleave.setApply_time(new Date());
            super.setEdit(false);
        }
        
        return SUCCESS;
    }
    
    public AsProLeave getProleave() {
        return proleave;
    }
    
    public void setProleave(AsProLeave proleave) {
        this.proleave = proleave;
    }
}
